<?php
class Model_Transaction extends ORM {

	public function rules() {
		return array(
			'amount' => array(
				array('not_empty'),
			),
			'payment_type' => array(
				array('not_empty'),
			),
		);
	}
	
	protected $_belongs_to = array(
		'user' => array(
			'model' => 'user',
			'foreign_key' => 'user_id',
		),
		'order' => array(
			'model' => 'order',
			'foreign_key' => 'order_id',
		),
	);
}